from pymongo import MongoClient

client = MongoClient('mongodb://localhost:27017')
database = client['stocks']

# 获取股票列表集合
stock_list_collection = database['stock_list']

if input('confirm? (yes|no)') == 'yes':
    stock_list_collection.drop()
else:
    print('取消操作')
